import {NgModule, ErrorHandler} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {HttpModule} from '@angular/http';
import {ReactiveFormsModule} from '@angular/forms';
import {IonicApp, IonicModule, IonicErrorHandler} from 'ionic-angular';
import {MyApp} from './app.component';
import {IonicStorageModule} from '@ionic/storage';

import {ComponentsModule} from '../components/components.module'
import {PipesModule} from '../pipes/pipes.module'

import {AboutPage} from '../pages/about/about';
import {FeedbackPage} from '../pages/feedback/feedback';
import {ContactPage} from '../pages/contact/contact';
import {HomePage} from '../pages/home/home';
import {LoginPage} from '../pages/login/login';
import {LoginPasswordPage} from '../pages/login-password/login-password';
import {RegisterPage} from '../pages/register/register';
import {TabsPage} from '../pages/tabs/tabs';
import {ProductPage} from '../pages/product/product';
import {ProductDetailPage} from '../pages/product-detail/product-detail';
import {MinePage} from '../pages/mine/mine';
import {PayPage} from '../pages/pay/pay';
import {RechargePage} from '../pages/recharge/recharge';
import {BillHistoryPage} from '../pages/bill-history/bill-history';
import {InvestmentRecordPage} from '../pages/investment-record/investment-record';
import {MessageCenterPage} from '../pages/message-center/message-center';

import {StatusBar} from '@ionic-native/status-bar';
import {SplashScreen} from '@ionic-native/splash-screen';

import {ControlsCheck} from '../common/controlsCheck';
import {CONST} from '../common/const';
import {Helper} from "../common/Helper";
import {API} from '../common/api';
import {HttpProvider} from '../common/http';
import {HttpClientModule} from '@angular/common/http';
import {AppShare} from "../common/share";

import {SettingPage} from "../pages/setting/setting";
import {AuthBindPage} from "../pages/auth-bind/auth-bind";
import {BindMobilePage} from "../pages/bind-mobile/bind-mobile";
import {CertificationPage} from "../pages/certification/certification";
import {BankCardPage} from "../pages/bank-card/bank-card";
import {BankCardAddPage} from "../pages/bank-card-add/bank-card-add";
import {CouponsPage} from "../pages/coupons/coupons";
import {BindIdcardPage} from "../pages/bind-idcard/bind-idcard";
import {PayPasswordPage} from "../pages/pay-password/pay-password";
import {GPayKeyboardComponent} from "../components/g-pay-keyboard/g-pay-keyboard";
import {GPayChooseComponent} from "../components/g-pay-choose/g-pay-choose";
import {ThemeableBrowser} from "@ionic-native/themeable-browser";
import {InAppBrowser} from "@ionic-native/in-app-browser";
import {IframePage} from "../pages/iframe/iframe";
import {RegisterProvider} from '../providers/register/register';
import {HomeProvider} from '../providers/home/home';
import {LoginProvider} from '../providers/login/login';
import {UserProvider} from '../providers/user/user';
import {ProductProvider} from '../providers/product/product';

@NgModule({
  declarations: [
    MyApp,
    AboutPage,
    FeedbackPage,
    ContactPage,
    HomePage,
    LoginPage,
    LoginPasswordPage,
    RegisterPage,
    TabsPage,
    ProductPage,
    ProductDetailPage,
    MinePage,
    PayPage,
    RechargePage,
    InvestmentRecordPage,
    BillHistoryPage,
    MessageCenterPage,
    SettingPage,
    AuthBindPage,
    BindMobilePage,
    CertificationPage,
    BankCardPage,
    BankCardAddPage,
    CouponsPage,
    BindIdcardPage,
    PayPasswordPage,
    IframePage,
    GPayKeyboardComponent,
    GPayChooseComponent
  ],
  imports: [
    BrowserModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpModule,
    IonicModule.forRoot(MyApp, {
      backButtonIcon: 'ios-arrow-back',
      backButtonText: '',
      pageTransition: 'md-transition',
      activator: 'ripple',
      iconMode: 'ios',
      mode: 'md',
      tabsHideOnSubPages: true,
      swipeBackEnabled: false,
      popoverEnter: 'g-popover-pop-in',
      popoverLeave: 'g-popover-pop-out',
    }),
    ComponentsModule,
    PipesModule,
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    AboutPage,
    FeedbackPage,
    ContactPage,
    HomePage,
    LoginPage,
    LoginPasswordPage,
    RegisterPage,
    TabsPage,
    ProductPage,
    ProductDetailPage,
    MinePage,
    PayPage,
    RechargePage,
    InvestmentRecordPage,
    BillHistoryPage,
    MessageCenterPage,
    SettingPage,
    AuthBindPage,
    BindMobilePage,
    CertificationPage,
    BankCardPage,
    BankCardAddPage,
    CouponsPage,
    BindIdcardPage,
    PayPasswordPage,
    IframePage,
    GPayKeyboardComponent,
    GPayChooseComponent
  ],
  providers: [
    StatusBar,
    SplashScreen,
    ControlsCheck,
    ThemeableBrowser,
    InAppBrowser,
    CONST,
    Helper,
    AppShare,
    API,
    HttpProvider,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    RegisterProvider,
    HomeProvider,
    LoginProvider,
    UserProvider,
    ProductProvider
  ]
})
export class AppModule {
}
